package com.elsa.smart_buffet.controller;

import com.alibaba.fastjson.JSON;
import com.elsa.smart_buffet.pojo.ResultBox.ResponseResult;
import com.elsa.smart_buffet.service.MenuIncomeExpenseService;
import com.elsa.smart_buffet.service.MenuOrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @ClassName : MenuIncomeExpenseController  //类名
 * @Author : elsa //作者
 */
@RestController
@CrossOrigin
public class MenuIncomeExpenseController {

    @Autowired
    private MenuIncomeExpenseService menuIncomeExpenseService;

    @PostMapping("/getMenuIncomeExpenseByTime")
    public ResponseResult selectMenuOrderMapperFromOrder(@RequestBody String data) {
        return menuIncomeExpenseService.getMenuIncomeExpenseByTime(JSON.parseObject(data).get("data").toString());
    }

}
